import { RouteRecordRaw, createRouter, createWebHashHistory } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/home',
    name: 'Home',
    meta: {
      title: '首页',
      keepAlive: true,
    },
    component: () => import('../pages/home/index.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    meta: {
      title: '登录页',
      keepAlive: true,
    },
    component: () => import('../pages/login/index.vue'),
  },
]
const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
